package com.atguigu.cloud.apis;

import com.atguigu.cloud.entities.PayDTO;
import com.atguigu.cloud.resp.ResultData;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ViGrayThorn
 * @since 1.0.0
 * date 2025-09-09 14:30:40
 */
@FeignClient("cloud-payment-service")

public interface PayFeignApi {

	@PostMapping(value = "/pay/add")
	ResultData<String> addPay(@RequestBody PayDTO payDTO);

	@DeleteMapping(value = "/pay/delete/{id}")
	ResultData<Integer> deletePay(@PathVariable("id") Integer id);

	@PutMapping(value = "/pay/update")
	ResultData<String> updatePay(@RequestBody PayDTO payDTO);

	@GetMapping(value = "/pay/select/{id}")
	ResultData<PayDTO> selectById(@PathVariable("id") Integer id);

	@GetMapping(value = "/pay/selectAll")
	ResultData<List<PayDTO>> selectAll();

	@GetMapping(value = "/pay/get/info")
	String getInfoByConsul(@Value("${atguigu.info}") String atguiguInfo);
}
